package com.ly.mpayment.persist.entity;

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Version;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.OptimisticLock;


/**
 * DownShopInfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="downshopinfo"

)
public class DownShopInfo  implements java.io.Serializable {


    // Fields

     private String downshopuuid;
     private ProvincialInformation provincialInformation;
     private User user;
     private String downshopip;
     private String downkey;
     private String downshopnum;
     private Date createtime;
     private int status;//状态 目前信息状态跟随用户状态变化，以用户状态为准,此处作为产品的状态,维护还是正常使用   0删除  1 正常 2 禁用维护
     private BigDecimal downshopbalance;
     private BigDecimal merchantcredit;
     private Date modifytime;
     private int callNum;
     private BigDecimal credit;
     private String orderCallAddress;

     private int version;
    //通知开关
    private Boolean noticeSwitch;
    //余额通知
    private BigDecimal noticeBalance;

    private BigDecimal totalMoney;
    // Constructors

    /** default constructor */
    public DownShopInfo() {
    }


    /** full constructor */
    public DownShopInfo(ProvincialInformation provincialInformation, User user, String downshopip, String downkey, String downshopnum, Date createtime, int status, BigDecimal downshopbalance, BigDecimal merchantcredit, String remark, Date modifytime) {
        this.provincialInformation = provincialInformation;
        this.user = user;
        this.downshopip = downshopip;
        this.downkey = downkey;
        this.downshopnum = downshopnum;
        this.createtime = createtime;
        this.status = status;
        this.downshopbalance = downshopbalance;
        this.merchantcredit = merchantcredit;
        this.modifytime = modifytime;
    }


    // Property accessors
    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @Column(name="downshopuuid", unique=true, nullable=false, length=40)
    public String getDownshopuuid() {
        return this.downshopuuid;
    }

    public void setDownshopuuid(String downshopuuid) {
        this.downshopuuid = downshopuuid;
    }


//    @Column(name="version")
    @Version
    @Column(name="version")
 	public int getVersion() {
 		return version;
 	}


 	public void setVersion(int version) {
 		this.version = version;
 	}

	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="provinceuuid")

    public ProvincialInformation getProvincialInformation() {
        return this.provincialInformation;
    }

    public void setProvincialInformation(ProvincialInformation provincialInformation) {
        this.provincialInformation = provincialInformation;
    }
	@ManyToOne(fetch=FetchType.EAGER)
        @JoinColumn(name="useruuid")

    public User getUser() {
        return this.user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @Column(name="downshopip", length=40)

    public String getDownshopip() {
        return this.downshopip;
    }

    public void setDownshopip(String downshopip) {
        this.downshopip = downshopip;
    }

    @Column(name="downkey", length=100)

    public String getDownkey() {
        return this.downkey;
    }

    public void setDownkey(String downkey) {
        this.downkey = downkey;
    }

    @Column(name="downshopnum", length=40)

    public String getDownshopnum() {
        return this.downshopnum;
    }

    public void setDownshopnum(String downshopnum) {
        this.downshopnum = downshopnum;
    }

    @Column(name="createtime", length=19)

    public Date getCreatetime() {
        return this.createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    @Column(name="status")

    public int getStatus() {
        return this.status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Column(name="downshopbalance", precision=28, scale=5)
    public BigDecimal getDownshopbalance() {
        return this.downshopbalance;
    }

    public void setDownshopbalance(BigDecimal downshopbalance) {
        this.downshopbalance = downshopbalance;
    }

    @Column(name="merchantcredit", precision=28, scale=5)

    public BigDecimal getMerchantcredit() {
        return this.merchantcredit;
    }

    public void setMerchantcredit(BigDecimal merchantcredit) {
        this.merchantcredit = merchantcredit;
    }

//    @Column(name="remark", length=1000)
//
//    public String getRemark() {
//        return this.remark;
//    }
//
//    public void setRemark(String remark) {
//        this.remark = remark;
//    }

    @Column(name="modifytime", length=19)

    public Date getModifytime() {
        return this.modifytime;
    }

    public void setModifytime(Date modifytime) {
        this.modifytime = modifytime;
    }

    @Column(name="call_num")
	public int getCallNum() {
		return callNum;
	}


	public void setCallNum(int callNum) {
		this.callNum = callNum;
	}

	@Column(name="credit")
	public BigDecimal getCredit() {
		return credit;
	}

	public void setCredit(BigDecimal credit) {
		this.credit = credit;
	}

    @Column(name="order_call_address")
	public String getOrderCallAddress() {
		return orderCallAddress;
	}

	public void setOrderCallAddress(String orderCallAddress) {
		this.orderCallAddress = orderCallAddress;
	}

    @Column(name = "notice_switch")
    public Boolean getNoticeSwitch() {
        return noticeSwitch;
    }

    public void setNoticeSwitch(Boolean noticeSwitch) {
        this.noticeSwitch = noticeSwitch;
    }

    @Column(name = "notice_balance")
    public BigDecimal getNoticeBalance() {
        return noticeBalance;
    }

    public void setNoticeBalance(BigDecimal noticeBalance) {
        this.noticeBalance = noticeBalance;
    }


    @Column(name="total_money", precision=28, scale=5)
    public BigDecimal getTotalMoney() {
        return totalMoney;
    }

    public void setTotalMoney(BigDecimal totalMoney) {
        this.totalMoney = totalMoney;
    }





}
